package com.ruoyi.project.system.scholarship.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.scholarship.mapper.ScholarshipMapper;
import com.ruoyi.project.system.scholarship.domain.Scholarship;
import com.ruoyi.project.system.scholarship.service.IScholarshipService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 奖学金管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class ScholarshipServiceImpl implements IScholarshipService 
{
    @Autowired
    private ScholarshipMapper scholarshipMapper;

    /**
     * 查询奖学金管理
     * 
     * @param iid 奖学金管理主键
     * @return 奖学金管理
     */
    @Override
    public Scholarship selectScholarshipByIid(Long iid)
    {
        return scholarshipMapper.selectScholarshipByIid(iid);
    }

    /**
     * 查询奖学金管理列表
     * 
     * @param scholarship 奖学金管理
     * @return 奖学金管理
     */
    @Override
    public List<Scholarship> selectScholarshipList(Scholarship scholarship)
    {
        return scholarshipMapper.selectScholarshipList(scholarship);
    }

    /**
     * 新增奖学金管理
     * 
     * @param scholarship 奖学金管理
     * @return 结果
     */
    @Override
    public int insertScholarship(Scholarship scholarship)
    {
        return scholarshipMapper.insertScholarship(scholarship);
    }

    /**
     * 修改奖学金管理
     * 
     * @param scholarship 奖学金管理
     * @return 结果
     */
    @Override
    public int updateScholarship(Scholarship scholarship)
    {
        return scholarshipMapper.updateScholarship(scholarship);
    }

    /**
     * 批量删除奖学金管理
     * 
     * @param iids 需要删除的奖学金管理主键
     * @return 结果
     */
    @Override
    public int deleteScholarshipByIids(String iids)
    {
        return scholarshipMapper.deleteScholarshipByIids(Convert.toStrArray(iids));
    }

    /**
     * 删除奖学金管理信息
     * 
     * @param iid 奖学金管理主键
     * @return 结果
     */
    @Override
    public int deleteScholarshipByIid(Long iid)
    {
        return scholarshipMapper.deleteScholarshipByIid(iid);
    }
}
